{extend name="base" /}
{block name="body"}
<blockquote class="layui-elem-quote news_search">
		<div class="layui-inline">
		
		<form id="searchform">
		    
		    <div class="layui-input-inline search-form">
		  <select name="tid" class="layui-input">
                                             
                                                    <option value=""  {if condition="empty(input('tid'))"}selected{/if}>全部</option>
                                                    
                                                    {volist name="articlecate" id="vo"}
                                                    <option value="{$vo.id}"  {if condition="input('tid') eq $vo.id"}selected{/if}>{$vo.name}</option>
                                                   {/volist}
              </select>
		    </div>
		    <a class="layui-btn search_btn"  id="search" data-url="{:url('articlelist')}">查询</a>
		    </form>
		</div>
        <div class="layui-inline">
		
<ob_link><a class="layui-btn layui-btn-normal Add_btn" data-title="添加文章" data-url="{:url('articleAdd')}"><i class="fa fa-plus"></i> 新 增</a></ob_link>
			
</div>
<div class="layui-inline">
			<ob_link><a class="layui-btn layui-btn-danger batchDel" data-url="{:url('articleAlldel')}">批量删除</a></ob_link>
	
		</div>
</blockquote>
	<div class="layui-form users_list">
	  	<table class="layui-table">
				<thead>
                    <tr>
                      {notempty name='list'}
					<th width="5%" style="text-align:center"><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose" id="allChoose"></th>
					 {/notempty}
                       <th><a href="">标题</a></th>
                        <th>所属分类</th>
                       
                         <th>发布者</th>
                   
                       <th>精品</th>
                        <th>置顶</th>
                      <th>时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                       {notempty name='list'}
                  <tbody class="users_content">
                    {foreach name="$list" item="vo"}
                    <tr>
                        <td width="5%" style="text-align:center"><input type="checkbox" name="checked" lay-skin="primary" lay-filter="choose" value="{$vo.id}"></td>
                       <td>{$vo.title}</td>
                       <td>{$vo.tidname}</td>
                     
                        <td>{$vo.username}</td>
                       
                         <td><input type="checkbox" data-url="{:url('articleCstatus',['id'=>$vo['id']])}" name="choice" lay-skin="switch" lay-text="精品|普通" lay-filter="switchTest"  value="{$vo['choice']}" {php}echo $vo['choice']==1 ? 'checked' : '';{/php}></td>
                         <td><input type="checkbox" data-url="{:url('articleCstatus',['id'=>$vo['id']])}" name="settop" lay-skin="switch" lay-text="置顶|普通" lay-filter="switchTest"  value="{$vo['settop']}" {php}echo $vo['settop']==1 ? 'checked' : '';{/php}></td>
                           <td>{$vo.create_time|friendlyDate}</td>
                        <td>
                               <ob_link><a data-title="编辑文章"  data-url="{:url('articleEdit',['id'=>$vo['id']])}" class="layui-btn layui-btn-mini users_edit"><i class="fa fa-edit"></i>编辑</a></ob_link>
                     
                      <ob_link><a class="layui-btn layui-btn-danger layui-btn-mini users_del" href="javascript:;"  data-url="{:url('articleDel', array('id' => $vo['id']))}"><i class="fa fa-trash-o"></i> 删 除</a></ob_link>
                 
                      </td>
                    </tr>
                    {/foreach}
                    </tbody>
                      {else/}
       <tbody class="users_content">
       <tr class="odd"><td colspan="8" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr>
       </tbody>
      {/notempty}
                </table>
	</div>


			
{/block}
 {block name="page"}
<div class="btable-paged" >
<div class="layui-main">
	{$list->render()}
</div>
</div>
 {/block}
